package com.mkz.order.controller;

import com.mkz.core.common.util.ResponseResult;
import com.mkz.core.log.annotation.SysLog;
import com.mkz.order.service.OrderService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.*;


/**
 * 订单表
 *
 * @author KuangJianyu
 * @date 2020-05-06 13:47:00
 */
@RestController
@AllArgsConstructor
@RequestMapping("/order" )
@Api(value = "order", tags = "订单表管理")
public class OrderController {

    private final  OrderService orderService;

    /**
     * 新增订单表
     * @param order 订单表
     * @return ResponseResult
     */
    @ApiOperation(value = "新增订单表", notes = "新增订单表")
    @SysLog("新增订单表" )
    @PostMapping("/save")
    public ResponseResult save() {
        return ResponseResult.ok(this.orderService.createOrder("666", "product-1", 1));
    }

}
